<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="referrer" content="no-referrer">
</head>
<style>

    ._bottom{
        width: 100%;
        height: 50px;
        position: fixed;
        bottom: 0px;
    }

</style>
<body>

<!--<div id="mse"></div>-->
<!--<div class="_bottom" id="mse2"></div>-->
<div class="content">
    <h1>视频播放器</h1>
    <p align="center"></p>
    <div class="middleBox" style="height: 50%;width: 50%;">
        <div id="dplayer"></div>
    </div>

    <button onclick="a()">下载测试</button>

</div>


</body>
<link rel="stylesheet" href="css/DPlayer.min.css">
<script src="/js/flv.min.js"></script>
<script src="/js/hls.min.js"></script>
<script src="/js/DPlayer.min.js"></script>
<script>
    function a() {
        $.ajax({ url: "/x/down?av=BV1XK4y1A7x4", success: function(){
                console.log("s")
            }});
    }
    const dp = new DPlayer({
        container: document.getElementById('dplayer'),

        video: {
            url: '/x/flv?av=BV1XK4y1A7x4',
            autoplay: true,
            screenshot: true,
            danmaku: {
                id: '9E2E3368B56CDBB4',
                api: 'https://api.prprpr.me/dplayer/',
                token: 'tokendemo',
                maximum: 1000,
                addition: ['https://api.prprpr.me/dplayer/v3/bilibili?aid=888129779'],
                user: 'DIYgod',
                bottom: '15%',
                unlimited: true,
            },

    }
    }
    );



</script>


<!--<script src="js/xgplayer/index.js"></script>-->
<!--<script src="js/xgplayer/xgmusic.js"></script>-->
<!--<script src="js/pc.js"></script>-->
<!--<script src="js/flv.min.js"></script>-->
<!--<script>-->


<!--    if (flvjs.isSupported()) {-->
<!--        var videoElement = document.getElementById('videoElement');-->
<!--        var flvPlayer = flvjs.createPlayer({-->
<!--            type: 'flv',-->
<!--            url: '/x/flv?av=BV1XK4y1A7x4'-->
<!--        });-->
<!--        flvPlayer.attachMediaElement(videoElement);-->
<!--        flvPlayer.load();-->
<!--        flvPlayer.play();-->
<!--    }-->

<!--    // let audio = new window.Music({-->
<!--    //     id: 'mse2',-->
<!--    //     url: [{src: '/x/audio?av=BV1XK4y1A7x4', name: '林宥嘉·脆弱一分钟', poster: '//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/music/poster-small.jpeg'}],-->
<!--    //     volume: 0.8,-->
<!--    //     width: window.innerWidth,-->
<!--    //     height: 50,-->
<!--    //     download: true,-->
<!--    //     autoplay: true-->
<!--    // });-->
<!--    // audio.crossOrigin = "anonymous";-->

<!--    // let vedio = new Player({-->
<!--    //     el:document.querySelector('#mse'),-->
<!--    //     url: '/x/flv?av=BV1XK4y1A7x4',-->
<!--    //     autoplay: true-->
<!--    // });-->

<!--    // vedio.crossOrigin = "anonymous";-->
<!--    // audio.on('play',function () {-->
<!--    //     if(vedio.readyState) {-->
<!--    //         vedio.play();-->
<!--    //     }else {-->
<!--    //         audio.pause();-->
<!--    //     }-->
<!--    // })-->
<!--    // audio.on('pause',function () {-->
<!--    //     vedio.pause();-->
<!--    // })-->
<!--    //-->
<!--    //-->
<!--    // audio.on('timeupdate',function () {-->
<!--    //     vedio.currentTime = audio.currentTime;-->
<!--    // })-->


<!--</script>-->
</html>